<?php

namespace App\Admin;

use Illuminate\Database\Eloquent\Model;

class Category extends Model
{
    //表名
    protected $table = 'category';
    //关闭时间戳
    public $timestamps = false;
    //插入数据库设置白名单
    protected $fillable =['name','describe','visitor','recommend','disstatus','constatus','time','pid'];
    //定义关系到单品表
    public function singles(){
        return $this->hasMany('App\Admin\Single');
    }
}
